New computer architecture designs continue to improve the processing performance of computer processors. However, the existing computer programs often cannot be directly executed on new computer architectures.
To execute computer programs written for older computer processor architectures on a newer computer processors architectures, computer systems may perform binary translation. A binary translator translates blocks of code written for older processor architecture into equivalent blocks of code that can be executed on a newer processor architecture. The translation can be done “on the fly” (i.e., while executing the older architecture code). Translation could also be done before execution.
Binary translators typically insert extra instructions as necessary to ensure the instructions written for the older processor architecture will function properly on the newer processor architecture. Since the extra instructions added are not directly related to the goal of the original program, these extra instructions are “overhead” code that reduces performance. It would be desirable to implement translators in a manner that reduces the amount of overhead code.